package com.zbkj.front.controller.user;

import com.zbkj.common.annotation.LogControllerAnnotation;
import com.zbkj.common.enums.MethodType;
import com.zbkj.common.page.CommonPage;
import com.zbkj.common.request.*;
import com.zbkj.common.response.MerchantStoreOrderDetailResponse;
import com.zbkj.common.response.MerchantStoreOrderPageDataResponse;
import com.zbkj.common.response.OrderNoResponse;
import com.zbkj.common.result.CommonResult;
import com.zbkj.service.service.MerchantStoreOrderService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

/**
 * 商户门店订单控制器 前端控制器
 */
@Slf4j
@RestController
@RequestMapping("api/front/merchant/store/order")
@Api(tags = "商户门店订单控制器") //配合swagger使用

public class MerchantStoreOrderController {

    @Autowired
    private MerchantStoreOrderService merchantStoreOrderService;

    @ApiOperation(value = "创建订单")
    @RequestMapping(value = "/user/create", method = RequestMethod.POST)
    public CommonResult<OrderNoResponse> createOrder(@RequestBody @Validated MerchantStoreOrderFrontSaveRequest request) {
        return CommonResult.success(merchantStoreOrderService.createOrder(request));
    }

}



